Skip to content

Conversation

@KRRT7
Copy link
Contributor

@KRRT7 KRRT7 commented May 13, 2025

Hi @grzegorz-roboflow,

This Pull Request sets up a Codeflash benchmark optimization workflow that automatically optimizes code in future pull requests that modify benchmark code.

When Codeflash discovers optimizations, it guarantees their correctness and reports the expected performance improvements for each benchmark.

We've set up the following inference benchmark to be optimized in CI:
inference benchmark python-package-speed -m yolov8n-seg-640 -bi 10000

We believe Roboflow would benefit from a broader set of end-to-end benchmarks that reflect real workflows.

To support this initiative, we'd like Roboflow to define benchmarks for workflows you consider important to optimize.

These benchmarks should be lightweight enough to run quickly and follow the pytest-benchmark format. (Note: Codeflash uses its own pytest plugin rather than the actual pytest-benchmark plugin.)

Let us know if you have any questions or need help setting this up!

@grzegorz-roboflow
Copy link
Collaborator

Hi @aseembits93, is this ready for review?

@aseembits93
Copy link
Contributor

Hi @grzegorz-roboflow ! it's ready for review, please let me know any feedback, the feedback is invaluable to us.

@grzegorz-roboflow grzegorz-roboflow marked this pull request as ready for review June 11, 2025 08:40
@misrasaurabh1
Copy link
Contributor

we are looking at resolving the failing tests


model = get_model(model_id="yolov8n-640", api_key=None)

benchmark(model.infer, images) No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this symbol imported?

Copy link
Contributor

@aseembits93 aseembits93 Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @PawelPeczek-Roboflow , We follow the style of pytest-benchmark in writing tests (https://pytest-benchmark.readthedocs.io/en/latest/) but override the benchmark keyword to suit our style of benchmarking. The 'benchmark' keyword is injected by codeflash during execution. This file is only executed by codeflash during codeflash --benchmark, it is outside any test subdirectory and won't be encountered by any of the CI workflows except the codeflash workflow.

@PawelPeczek-Roboflow PawelPeczek-Roboflow merged commit 9cec876 into roboflow:main Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants